/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.great.functionalCore;

import java.net.*;
import java.io.*;
import br.great.beans.User;
import br.great.exception.*;
import br.great.config.*;
import br.great.DAO.*;

/**
 *
 * @author C�line DEFAUT
 */
public class UserValidator {
    private User user;
    
    private static UserValidator instance;
    
    private UserValidator(){
    }
    
    public static UserValidator getInstance(){
        if(instance == null){
            instance = new UserValidator();
        }
        return instance;
    }
    
    public User validateUser(String login, String password) throws UnknownUserException {
        DAO_User dao = DAO_User.getInstance();
        return dao.getUserByLoginAndPassword(login, password);
    }


}
